// toma 2016-6-4 08:50:11

var gulp = require('gulp'),
    cssmin = require('gulp-clean-css'),
    sass = require('gulp-sass');

// sass
gulp.task('sass', function () {
  return gulp.src('src/sass/*.scss')
    .pipe(sass.sync().on('error', sass.logError))
    .pipe(gulp.dest('src/css'));
});

// CSSmin
gulp.task('cssmin', function () {
  gulp.src('src/css/*.css')
    .pipe(cssmin())
    .pipe(gulp.dest('src/css'));
});


gulp.task('default', function () {
  gulp.watch('src/sass/*.scss', ['sass']);
});
